package org.jader.bolao.gui.swing;

import java.io.File;

import javax.swing.JFileChooser;
import javax.swing.filechooser.FileFilter;

public class FileChooser extends JFileChooser {
	private static final long serialVersionUID = 1L;
	
	public FileChooser() {
		super();
		this.setFileFilter(new FileFilter() {
			@Override
			public boolean accept(File arg0) {
				if (arg0.isDirectory()) return true;
				return arg0.getName().endsWith("xml");
			}

			@Override
			public String getDescription() {
				return "Arquivos de campeonato (*.xml)";
			}
		});
	}
}
